import React from 'react'
import { Table,Row,Col,Divider } from 'antd'

class Xmj extends React.Component{

    render(){
        // -------------修毛胶机管理------------------- start
        const 修毛胶机管理数据 = [{
            key: '1',
            state:'作业中',
            machinename: '4#',
            repair:'禁用/启用',
            repairbefore: '禁用/启用'
        }, {
            key: '2',
            state:'待机中',
            machinename: '5#',
            repair: '禁用/启用',
            repairbefore: '禁用/启用'
        },
            {
                key: '2',
                state:'停机中',
                machinename: '6#',
                repair: '禁用/启用',
                repairbefore: '禁用/启用'
            }]

        const 修毛胶机列 = [{
            title: '设备编号',
            dataIndex: 'machinename',
            key: 'machinename',
        }, {
            title: '修毛胶机状态',
            dataIndex: 'state',
            key: 'state',
        }, {
            title: '修毛胶机',
            dataIndex: 'repair',
            key: 'repair',
        }, {
            title: '修毛前缓存',
            dataIndex: 'repairbefore',
            key: 'repairbefore',
        }]
        // -------------修毛胶机管理------------------- end

        // -------------修毛胶机停机数据------------------- start
        const 停机数据 = [{
            key: '1',
            mach:'4#',
            date:'2018-08-23',
            stopDateTime:'2018-08-23',
            stopName:'人工禁用',
            cause:'保养',
            doType:'日常保养',
            replace:'无',
            startTime:'2018-08-23',
            countStopTime:'20min'
        }, {
            key: '1',
            mach:'6#',
            date:'2018-08-22',
            stopDateTime:'2018-07-23',
            stopName:'人工禁用',
            cause:'保养',
            doType:'日常保养',
            replace:'无',
            startTime:'2018-08-23',
            countStopTime:'25min'
        }]

        const 停机列 = [{
            title: '机台号',
            dataIndex: 'mach',
            key: 'state',
        },{
            title: '日期',
            dataIndex: 'date',
            key: 'state',
        },{
            title: '停机时间',
            dataIndex: 'stopDateTime',
            key: 'state',
        },{
            title: '停机名称',
            dataIndex: 'stopName',
            key: 'state',
        },{
            title: '停机具体原因',
            dataIndex: 'cause',
            key: 'state',
        },{
            title: '处理方式',
            dataIndex: 'doType',
            key: 'repair',
        },{
            title: '零配件更换',
            dataIndex: 'replace',
            key: 'repairbefore',
        },{
            title: '启动时间',
            dataIndex: 'startTime',
            key: 'repairbefore',
        },{
            title: '总停机时间',
            dataIndex: 'countStopTime',
            key: 'repairbefore',
        }]
        // -------------修毛胶机停机数据------------------- end

        // -------------保养/换刀记录(胎冠刀)------------------- start
        const 换刀数据 = [{
            key: '1',
            mach:'4#',
            repairCount:'980',
            count:'500',
            LCount:'480'
        },{
            key: '1',
            mach:'5#',
            repairCount:'700',
            count:'500',
            LCount:'200'
        },{
            key: '1',
            mach:'6#',
            repairCount:'1010',
            count:'500',
            LCount:'510'
        }]

        const 换刀列 = [{
            title: '设备编号',
            dataIndex: 'mach',
            key: 'state',
        },{
            title: '总修理条数',
            dataIndex: 'repairCount',
            key: 'state',
        },{
            title: '维护条数',
            dataIndex: 'count',
            key: 'state',
        },{
            title: '距离上次保养条数',
            dataIndex: 'LCount',
            key: 'state',
        }]
        // -------------保养/换刀记录(胎冠刀)------------------- end

        // ------------- 稼动率统计数据 ------------------- start
        const 稼动数据 = [{
            key: '1',
            mach:'4#',
            countTime:'60',
            runCountTime:'46',
            repairCount:'120',
            lazyCountTime:'14',
            stopCountTime:'0',
            rate:'77%'
        },{
            key: '1',
            mach:'5#',
            countTime:'60',
            runCountTime:'42',
            repairCount:'110',
            lazyCountTime:'0',
            stopCountTime:'13',
            rate:'70%'
        },{
            key: '1',
            mach:'6#',
            countTime:'60',
            runCountTime:'19',
            repairCount:'50',
            lazyCountTime:'0',
            stopCountTime:'41',
            rate:'32%'
        }]

        const 稼动列 = [{
            title: '设备编号',
            dataIndex: 'mach',
            key: 'state',
        },{
            title: '统计时间-min',
            dataIndex: 'countTime',
            key: 'state',
        },{
            title: '运行时间-min',
            dataIndex: 'runCountTime',
            key: 'state',
        },{
            title: '修理条数-条',
            dataIndex: 'repairCount',
            key: 'state',
        },{
            title: '待机时间-min',
            dataIndex: 'lazyCountTime',
            key: 'state',
        },{
            title: '停机时间-min',
            dataIndex: 'stopCountTime',
            key: 'state',
        },{
            title: '稼动率',
            dataIndex: 'rate',
            key: 'state',
        }]
        // ------------- 稼动率统计数据 ------------------- end

        // ------------- 修毛统计数据 ------------------- start
        const 修毛统计数据 = [{
            key: '1',
            mach:'4#',
            bar:'...',
            cutTime:'23.4',
            averageTime:'23.4',
            type:'...',
            count:'52',
        },{
            key: '1',
            mach:'5#',
            bar:'...',
            cutTime:'24.2',
            averageTime:'23.6',
            type:'...',
            count:'53',
        },{
            key: '1',
            mach:'6#',
            bar:'...',
            cutTime:'22.8',
            averageTime:'23.4',
            type:'...',
            count:'54',
        }]

        const 修毛统计列 = [{
            title: '设备编号',
            dataIndex: 'mach',
            key: 'state',
        },{
            title: '条码',
            dataIndex: 'bar',
            key: 'state',
        },{
            title: '修毛时间-s',
            dataIndex: 'cutTime',
            key: 'state',
        },{
            title: '前20条平均修毛时间-s',
            dataIndex: 'averageTime',
            key: 'state',
        },{
            title: '修毛模式',
            dataIndex: 'type',
            key: 'state',
        },{
            title: '修毛刀修理条数',
            dataIndex: 'count',
            key: 'state',
        }]
        // ------------- 修毛统计数据 ------------------- end

        // ------------- 刀伤统计数据 ------------------- start
        const 刀伤统计数据 = [{
            key: '1',
            mach:'4#',
            date:'20XX',
            registerTime:'xx:xx:xx',
            bad:'...',
            type:'...',
            count:'52',
        },{
            key: '1',
            mach:'5#',
            date:'20XX',
            registerTime:'xx:xx:xx',
            bad:'...',
            type:'...',
            count:'55',
        }]

        const 刀伤统计列 = [{
            title: '设备编号',
            dataIndex: 'mach',
            key: 'state',
        },{
            title: '日期',
            dataIndex: 'date',
            key: 'state',
        },{
            title: '登记时间',
            dataIndex: 'registerTime',
            key: 'state',
        },{
            title: '不良位置',
            dataIndex: 'bad',
            key: 'state',
        },{
            title: '修毛刀修理条数',
            dataIndex: 'count',
            key: 'state',
        }]
        // ------------- 刀伤统计数据 ------------------- end
        return(
            <div>
                {/* 按钮弹框 */}

                <div>
                        <Row gutter={10}>
                            <Col span={8}>
                                <p>1.1 修毛胶机管理</p>
                                <Table
                                    dataSource={修毛胶机管理数据}
                                    columns={修毛胶机列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                            <Col span={16}>
                                <p>1.2 修毛胶机停机记录</p>
                                <Table
                                    dataSource={停机数据}
                                    columns={停机列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                        </Row>
                        <Divider style={{backgroundColor:'#838B83'}}/>
                        <Row gutter={10}>
                            <Col span={8}>
                                <p>1.3 保养/换刀记录(胎冠刀)</p>
                                <Table
                                    dataSource={换刀数据}
                                    columns={换刀列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                            <Col span={16}>
                                <p>1.4 稼动率统计</p>
                                <Table
                                    dataSource={稼动数据}
                                    columns={稼动列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                        </Row>
                        <Divider style={{backgroundColor:'#838B83'}}/>
                        <Row gutter={10}>
                            <Col span={12}>
                                <p>1.5 修毛统计</p>
                                <Table
                                    dataSource={修毛统计数据}
                                    columns={修毛统计列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                            <Col span={12}>
                                <p>1.6 刀伤统计</p>
                                <Table
                                    dataSource={刀伤统计数据}
                                    columns={刀伤统计列}
                                    size={'small'}
                                    pagination={false}/>
                            </Col>
                        </Row>

                    </div>

            </div>
        )
    }
}
export default Xmj